package com.jiuqi.ccp.generator.dao.pojo;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/** 
 *        @hibernate.class
 *         table="CCP_QUARTZ_LOG"
 *     
*/
public class CcpQuartzLog implements Serializable {

    /** identifier field */
    private String cqlGuid;

    /** nullable persistent field */
    private String sessionId;

    /** nullable persistent field */
    private String cqrGuid;

    /** nullable persistent field */
    private String logType;

    /** nullable persistent field */
    private String logContent;

    /** nullable persistent field */
    private String logTime;

    /** full constructor */
    public CcpQuartzLog(String cqlGuid, String sessionId, String cqrGuid, String logType, String logContent, String logTime) {
        this.cqlGuid = cqlGuid;
        this.sessionId = sessionId;
        this.cqrGuid = cqrGuid;
        this.logType = logType;
        this.logContent = logContent;
        this.logTime = logTime;
    }

    /** default constructor */
    public CcpQuartzLog() {
    }

    /** minimal constructor */
    public CcpQuartzLog(String cqlGuid) {
        this.cqlGuid = cqlGuid;
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *             type="java.lang.String"
     *             column="CQL_GUID"
     *         
     */
    public String getCqlGuid() {
        return this.cqlGuid;
    }

    public void setCqlGuid(String cqlGuid) {
        this.cqlGuid = cqlGuid;
    }

    /** 
     *            @hibernate.property
     *             column="SESSION_ID"
     *             length="32"
     *         
     */
    public String getSessionId() {
        return this.sessionId;
    }

    public void setSessionId(String sessionId) {
        this.sessionId = sessionId;
    }

    /** 
     *            @hibernate.property
     *             column="CQR_GUID"
     *             length="32"
     *         
     */
    public String getCqrGuid() {
        return this.cqrGuid;
    }

    public void setCqrGuid(String cqrGuid) {
        this.cqrGuid = cqrGuid;
    }

    /** 
     *            @hibernate.property
     *             column="LOG_TYPE"
     *             length="1"
     *         
     */
    public String getLogType() {
        return this.logType;
    }

    public void setLogType(String logType) {
        this.logType = logType;
    }

    /** 
     *            @hibernate.property
     *             column="LOG_CONTENT"
     *             length="500"
     *         
     */
    public String getLogContent() {
        return this.logContent;
    }

    public void setLogContent(String logContent) {
        this.logContent = logContent;
    }

    /** 
     *            @hibernate.property
     *             column="LOG_TIME"
     *             length="14"
     *         
     */
    public String getLogTime() {
        return this.logTime;
    }

    public void setLogTime(String logTime) {
        this.logTime = logTime;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("cqlGuid", getCqlGuid())
            .toString();
    }

    public boolean equals(Object other) {
        if ( !(other instanceof CcpQuartzLog) ) return false;
        CcpQuartzLog castOther = (CcpQuartzLog) other;
        return new EqualsBuilder()
            .append(this.getCqlGuid(), castOther.getCqlGuid())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getCqlGuid())
            .toHashCode();
    }

}
